//// http://mathias.gaunard.com/unicode/doc/html/Converter.html
//// http://mathias.gaunard.com/unicode/doc/html/boost/convert_iterator.html
//
////--------------------------------------------------------------------------------------------------------------------------------
//
//
//#include <iterator>
//#include <sstream>
//#include <string>
//
////#include <boost/archive/iterators/ostream_iterator.hpp>
////#include <boost/archive/iterators/base64_from_binary.hpp>
////#include <boost/archive/iterators/binary_from_base64.hpp>
////#include <boost/archive/iterators/transform_width.hpp>
////
////
////#include "base64_iterator.hpp"
//
//#include <boost/range/adaptors.hpp>
//#include <boost/range/algorithm.hpp>
//#include <boost/range/algorithm_ext/is_sorted.hpp>
//#include <iostream>
//#include <vector>
//
//#include <boost/iterator/convert_iterator.hpp>
//#include <boost/iterator/converter_codecvt.hpp>
//
//#include "base64_range_adaptor.hpp"
//
//struct func
//{
//	void operator()(int x)
//	{
//		std::cout << x;
//	}
//};
//
//
//struct is_even
//{
//    bool operator()( int x ) const { return x % 2 == 0; }
//};
//
//int main()
//{
//	using namespace boost::adaptors;
//	int temp[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
//	std::vector<int> vec( temp, temp+10);
//
//
//
//	////boost::copy( vec | boost::adaptors::reversed, std::ostream_iterator<int>(std::cout) );
//
//	//auto rng = vec | boost::adaptors::reversed;
//	//boost::adaptors::reverse();
//	////std::cout << typeid(rng).name() << std::endl;
//
//	////for ( ; rng; ++rng )
//	////{
//	////	//std::cout << (unsigned int)*it << std::endl;
//	////	std::cout << *rng;
//	////}
//
//
//	//boost::for_each( rng, func() );
//
//
//    //boost::copy(
//    //    vec | sliced(2, 5),
//    //    std::ostream_iterator<int>(std::cout, ","));
//
//
//    //boost::copy(
//    //    vec | filtered(is_even()),
//    //    std::ostream_iterator<int>(std::cout, ","));
//
//
//    //boost::copy(
//    //    vec | base64ed,
//    //    std::ostream_iterator<int>(std::cout, ","));
//
//
//	//auto rng = vec | base64ed;
//	//
//	//boost::is_sorted( rng );
//
//
//
//
// //   using namespace boost::archive::iterators;
//	//using namespace boost::iterators;
//
// //   std::string test = "hello world";	//"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ornare ullamcorper ipsum ac gravida.";
//	////test.push_back(0);	//Padding
//
//	////request_stream.unsetf(std::ios::skipws); 
//
//
// //   std::stringstream os;
//
//	//typedef base64_iterator< std::string::iterator > base64_text;
//
//
// //  // std::copy( 
//	//		//	base64_text( test.begin() ),
//	//		//	base64_text( test.end() ), 
//	//		//	ostream_iterator<char>(os) 
//	//		//);
//
//
//	//base64_text it( test.begin() );
//	//base64_text end( test.end() );
//
//	//for ( ; it != end; ++it )
//	//{
//	//	//std::cout << (unsigned int)*it << std::endl;
//	//	std::cout << *it;
//	//}
//
//
//
// //   std::cout << os.str();
//}
//
//
//
//
//
//
////--------------------------------------------------------------------------------------------------------------------------------
//
//
//
//
//
//
//
//
//
////#include "boost/archive/iterators/base64_from_binary.hpp"
////#include "boost/archive/iterators/binary_from_base64.hpp"
////#include "boost/archive/iterators/transform_width.hpp"
////
////#include <string>
////#include <iostream>
////
////using namespace std;
////using namespace boost::archive::iterators;
////
//////typedef
//////	base64_from_binary<
//////		transform_width<std::string::iterator, 6, sizeof(char) * 8>
//////	> base64_t;
////
////typedef
////	base64_from_binary<
////		transform_width<std::string::iterator, 6, 8>
////	> base64_t;
////
////typedef
////	transform_width<
////		binary_from_base64<std::string::iterator>, sizeof(char) * 8, 6
////> binary_t;
////
////int main()
////{
////
////	string str = "Hello, world!";
////
////	cout << str << endl;
////
////	base64_t xxx1 (str.begin());
////	base64_t xxx2 (str.end());
////
////	string enc(base64_t(str.begin()), base64_t(str.end())); // Problem here. It works when I specify "str.end()-1" instead of "str.end()" but I 	loose last character after decoding.
////
////	cout << enc << endl;
////
////	string dec(binary_t(enc.begin()), binary_t(enc.end()));
////
////	cout << dec << endl;
////
////	return 0;
////
////} 
//
